package cn.edu.jxust.core.infrastructure.mapper;

import cn.edu.jxust.common.domain.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author QiuKangming
 * @since 2020-06-29
 */

public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 通过角色id获取角色名称
     * @param roleId 角色id号
     * @return String
     */
    @Select("SELECT role_name FROM t_role WHERE id = #{roleId} AND status = 1")
    String getRoleNameById(Integer roleId);

}
